package com.k2data.k2app.controller;

import com.k2data.k2app.domain.WarningRecord;
import com.k2data.k2app.response.CommonResultResponse;
import com.k2data.k2app.response.ResponseHelper;
import com.k2data.k2app.service.WarningRecordService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author cuilibo@k2data.com.cn
 */
@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private WarningRecordService warningRecordService;

    @Autowired
    public ReportController() {
    }


    @ApiOperation(value = "列表")
    @GetMapping(value = "")
    public ResponseEntity<CommonResultResponse> getList() throws Exception {
        List<WarningRecord> list = warningRecordService.list();
        return ResponseHelper.success(list);
    }

}
